// user.ts
// const util = require('../../utils/util.js')
// import { formatTime } from '../../utils/util'

Component({
  data: {
    canIUseGetUserProfile: wx.canIUse('getUserProfile'),
    canIUseNicknameComp: wx.canIUse('input.type.nickname'),
  },
  methods: {
    adLoad() {
      console.log('Banner 广告加载成功')
    },
    adError(err:any) {
      console.error('Banner 广告加载失败', err)
    },
    adClose() {
      console.log('Banner 广告关闭')
    },
    gotoHistory() {
      wx.navigateTo({
        url: '/pages/history/history',
      })
    },
    gotoList() {
      wx.navigateTo({
        url: '/pages/list/list',
      })
    },
    gotoPhoto() {
      wx.navigateToMiniProgram({
        shortLink: '#小程序://照片修改/rtoUJ52PPIGxXff',
        //develop开发版；trial体验版；release正式版
        envVersion: 'release',
        success(res) {
          // 打开成功
          console.log("跳转小程序成功！", res);
        }
      })
    }
  },
  lifetimes: {
    attached() {
    }
  },
})
